#ifndef INPUTMANAGER_HEADER
#define INPUTMANAGER_HEADER

#include "windows.h"
#include <list>
#include "AbstractClasses\MouseListener.h"
#include "AbstractClasses\KeyboardListener.h"

class InputManager {

public:
	static InputManager* Instance();
	static void create();
	static void destroy();
	
	void update(WPARAM	wParam, LPARAM	lParam, UINT uMsg);

	void registerKeyboardListener(KeyboardListener *);		//Registers a new keyboard listener in the inputmanager
	void deRegisterKeyboardListener(KeyboardListener *);	//Unregisters a new keyboard listener in the inputmanager
	void registerMouseListener(MouseListener *);		//Registers a new mouse listener in the inputmanager
	void deRegisterMouseListener(MouseListener *);		//Unregisters a new mouse listener in the inputmanager

	//???? mousePosition();
	bool isKeyDown();
	bool mouseLeftButtonDown();


protected:
	InputManager();
	~InputManager();
	

private:
	static InputManager* _instance;
	std::list<KeyboardListener *> keyboardListenersList;
	std::list<MouseListener *> mouseListenersList;
	bool keys[256];
};

#endif
